3.303 \(\int \frac{\cot ^2(c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=17 \[ -\frac{B \cot (c+d x)}{d}-B x \]

[Out]

-(B*x) - (B*Cot[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0114034, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.088, Rules used = {21, 3473, 8} \[ -\frac{B \cot (c+d x)}{d}-B x \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]^2*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

-(B*x) - (B*Cot[c + d*x])/d

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\cot ^2(c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx &=B \int \cot ^2(c+d x) \, dx\\ &=-\frac{B \cot (c+d x)}{d}-B \int 1 \, dx\\ &=-B x-\frac{B \cot (c+d x)}{d}\\ \end{align*}

Mathematica [C]  time = 0.0143815, size = 30, normalized size = 1.76 \[ -\frac{B \cot (c+d x) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-\tan ^2(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]^2*(a*B + b*B*Tan[c + d*x]))/(a + b*Tan[c + d*x]),x]

[Out]

-((B*Cot[c + d*x]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[c + d*x]^2])/d)

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 22, normalized size = 1.3 \begin{align*}{\frac{B \left ( -\cot \left ( dx+c \right ) -dx-c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

1/d*B*(-cot(d*x+c)-d*x-c)

________________________________________________________________________________________

Maxima [A]  time = 1.77949, size = 31, normalized size = 1.82 \begin{align*} -\frac{{\left (d x + c\right )} B + \frac{B}{\tan \left (d x + c\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-((d*x + c)*B + B/tan(d*x + c))/d

________________________________________________________________________________________

Fricas [B]  time = 1.89937, size = 99, normalized size = 5.82 \begin{align*} -\frac{B d x \sin \left (2 \, d x + 2 \, c\right ) + B \cos \left (2 \, d x + 2 \, c\right ) + B}{d \sin \left (2 \, d x + 2 \, c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-(B*d*x*sin(2*d*x + 2*c) + B*cos(2*d*x + 2*c) + B)/(d*sin(2*d*x + 2*c))

________________________________________________________________________________________

Sympy [A]  time = 33.2055, size = 37, normalized size = 2.18 \begin{align*} \begin{cases} - B x - \frac{B \cot{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\\frac{x \left (B a + B b \tan{\left (c \right )}\right ) \cot ^{2}{\left (c \right )}}{a + b \tan{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x)

[Out]

Piecewise((-B*x - B*cot(c + d*x)/d, Ne(d, 0)), (x*(B*a + B*b*tan(c))*cot(c)**2/(a + b*tan(c)), True))

________________________________________________________________________________________

Giac [B]  time = 1.25318, size = 53, normalized size = 3.12 \begin{align*} -\frac{2 \,{\left (d x + c\right )} B - B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{B}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(a*B+b*B*tan(d*x+c))/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*(d*x + c)*B - B*tan(1/2*d*x + 1/2*c) + B/tan(1/2*d*x + 1/2*c))/d